$(document).ready(function() {
    //600已确认   300未确认   500已下定
    if($("#checkFormData").parent().attr("Stauts")==="300"){
        $("#checkTrue").on("click",function(){
            $.ajax({
              url: "/Handler/DataHandler.ashx",
              type: "post",
              dataType: "json",
              data: {
                fun: "f_0003",
                id: $("#checkFormData").parent().attr("dataid"),
                Guest_Stauts: "600",
                Guest_ConfirmRemark:""
              },
              beforeSend: function() {
                //数据加载冻屏
                $("#checkTrue").button('loading');
              },
              success: function(msg) {
                //数据加载完毕解除冻屏
                $("#checkTrue").button('reset');
                if(msg.r_code=="1"){
                  toastr.success(msg.r_info, '系统提示：');
                  $("#checkFormData").parent().modal('hide');
                  $("#checkFormData").parent().remove();
                  //刷新页面
                  setTimeout(function () {
                      window.location.href = window.location.href;
                  }, 1500);
                }else if(msg.r_code=="0"){
                  toastr.error(msg.r_info, '错误提示：');
                }
              }
            });
        });
    }else{
        $("#checkTrue").addClass("hide");
    };
    $("#checkFormData").find("input").attr("disabled",true);
});